/**
 * xxx 模型
 */

'use strict';

var mongodb = require('./mongodb.js');
var Schema = mongodb.Schema;

// create a schema
var wareSchema = new Schema({
    name: String,
    // desc: String,
    // status: Number,
    // dateOnline: Date,
    // dateOffline: Date,
    price: Number,
    // marketPrice: Number,

    // mountTotal: Number,
    // mountSold: Number,
    // mountRemain: Number,

    category: [{
        type: Schema.Types.ObjectId,
        ref: 'category'
    }]
});

// 指定collection name，默认是复数
var ware = mongodb.model('ware', wareSchema, 'ware');
exports = module.exports = ware;